import React, {useState} from 'react'
import Input from './Input'
import List from './List'
import TodoProvider from '../../context/todo-list'

// children
const Header = ({title, children}) => {
    return (
        <div>
            <h1>{title}</h1>
            {children}
        </div>
    )
}

const TodoList = () => {
    return (
        <TodoProvider>
            <Header title="Todolist" />
            <Input />
            <List />
        </TodoProvider>
    )
}

export default TodoList